using System.IO;
using System.Text;

namespace Rsdn.Janus
{
    public class ConfigReader : StreamReader
    {
        public ConfigReader(Stream stream)
            : base(stream, (Encoding) Encoding.UTF8)
        {
            
        }

        public override int Read(char[] buffer, int index, int count)
        {
            int ret = base.Read(buffer, index, count);
            Config.ReplacePattern(buffer, index, count, "&#x0;");     //MLHIDE
            return ret;
        }


        //public override string ReadLine()
        //{
        //    string readLine = base.ReadLine();
        //    return Config.ReplaceWrongSymbols(readLine);
        //}
    }
}